use QLKS

----- Load Dich Vu -----
Create proc sp_loaddichvu
as
	Select * from dichvu
go


------ Load combo DVT DV --------
alter proc sp_loadDVT
as
	Select distinct donvitinh from dichvu
go

------ Them Dich Vu -------
alter proc sp_DichVu_ThemDV
@madv varchar(10),
@tendv nvarchar(50),
@gia money,
@donvitinh nvarchar(10)
as
	Insert into dichvu(madichvu, tendichvu, gia, donvitinh )
	Values (@madv, @tendv, @gia, @donvitinh )
go

------ Sua Dich Vu --------
alter proc sp_DichVu_SuaDV
@madv varchar(10),
@tendv nvarchar(50),
@gia money,
@donvitinh nvarchar(10)
as
	Update dichvu
	Set 
		tendichvu = @tendv,
		gia = @gia,
		donvitinh = @donvitinh
	Where madichvu = @madv
go

------ Xoa dich vu ----------
alter proc sp_DichVu_Xoa
@madv varchar(10)
as
	Delete from dichvu
	Where madichvu = @madv
go
